package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-08-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("coupon_code_log")
@NoArgsConstructor
public class CouponCodeLog implements Serializable {

    private static final long serialVersionUID = 1L;

    public CouponCodeLog(String code, String orderId) {
        this.code = code;
        this.orderId = orderId;
    }

    /**
     * 优惠券码使用记录表主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 券码
     */
    @TableField("code")
    private String code;

    /**
     * 对应订单id
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
